package com.fresh.service;

import java.util.List;

import com.fresh.entity.UserEntity;
import com.fresh.utils.PageModel;

/**
 * 用户
 * 
 * @author alex
 * @email gaonan.service@gmail.com
 * @date 2017-03-23 15:22:06
 */
public interface UserService {

	/**  
	* @Title: queryObject  
	* @Description: 根据用户id查询用户 
	* @param userId
	* @return UserEntity  
	* @throws  
	*/ 
	public UserEntity queryObject(String userId);

	/**
	 * 修改用户信息
	 * @param userEntity
	 * @param menuIds
	 * @param serviceIds
	 * @return
	 */
	public 	 boolean updateUser(UserEntity userEntity,String menuIds,String serviceIds);

	/**  
	* @Title: queryObject  
	* @Description: 根据用户名和密码查询用户 
	* @param name
	* @param pwd
	* @return UserEntity  
	* @throws  
	*/ 
	public UserEntity queryObject(String name, String pwd);

   /**
    * 新增用户信息
    * @param userEntity
    * @param menuIds
    * @param serviceIds
    * @return
    */
   public 	 boolean  save(UserEntity userEntity,String menuIds,String serviceIds);

   	/**  
   	* @Title: queryList  
   	* @Description: 根据id查询用户
   	* @param id
   	* @return List<UserEntity>  
   	* @throws  
   	*/ 
   	public List<UserEntity> queryList(String id);

    /**  
    * @Title: findById  
    * @Description: 根据id查询用户 
    * @param @param id
    * @param @return
    * @return UserEntity  
    * @throws  
    */ 
    public UserEntity findById(String id);

    /**  
    * @Title: deleteUser  
    * @Description: 根据id查询用户 
    * @param id
    * @return void  
    * @throws  
    */ 
    public void deleteUser(String id);
	
    public Boolean checkLogin(String name, Integer type);

    /**  
    * @Title: findByType  
    * @Description: 根据商户id查询用户 
    * @param shopId
    * @return UserEntity  
    * @throws  
    */ 
    public UserEntity findByType(String shopId);

    /**  
	* @Title: queryUserPage  
	* @Description: 分页
	* @param currentPage
	* @param size
	* @param shopId
	* @return PageModel<UserEntity>  
	* @throws  
	*/ 
	public PageModel<UserEntity> queryUserPage(int currentPage, int size,
			String shopId);
	 
	 /**  
	* @Title: queryUserCount  
	* @Description: 根据商户id查询总数
	* @param @param shopId
	* @param @return
	* @return int  
	* @throws  
	*/ 
	public int queryUserCount(String shopId);
	
	/**  
	* @Title: findByName
	* @Description: 根据姓名查询用户
	* @param name
	* @return List<UserEntity>
	* @throws  
	*/ 
	public List<UserEntity>findByName(String name);
	
	public Boolean updateUserByUserIdAndPwd(String id,String pwd);
	
}